package com.fxwater.biz.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fxwater.biz.domain.UnitInfo;
import com.fxwater.biz.mapper.UnitServiceMapper;
import com.fxwater.biz.service.IUnitService;
import com.fxwater.common.core.text.Convert;

@Service
public class UnitServiceImpl implements IUnitService {

	@Autowired
	private UnitServiceMapper unitMapper;
	
	@Override
	public List<UnitInfo> selectUnitInfoInfoList(UnitInfo unitInfo) {
		return unitMapper.selectUnitInfoInfoList(unitInfo);
	}

	@Override
	public int editSaveUnitInfo(UnitInfo unitInfo) {
		// TODO Auto-generated method stub
//		unitInfo.setUpdateBy(ShiroUtils.getLoginName());
		return unitMapper.editSaveUnitInfo(unitInfo);
	}

	@Override
	public int removeUnitInfo(String ids) {
		return unitMapper.removeUnitInfo(Convert.toStrArray(ids));
	}

	@Override
	public int addUnitInfo(UnitInfo unitInfo) {
//		unitInfo.setCreateBy(ShiroUtils.getLoginName());
		return unitMapper.addUnitInfo(unitInfo);
	}

}
